package com.game;

import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.graphics.GL10;
import com.badlogic.gdx.graphics.GLCommon;
import com.badlogic.gdx.graphics.OrthographicCamera;
import com.badlogic.gdx.graphics.Texture;
import com.badlogic.gdx.graphics.g2d.SpriteBatch;

public class IntroScreen extends Screen
{
    OrthographicCamera guiCam;
    Texture image;
    SpriteBatch batcher;

    public IntroScreen(MyGame game)
    {
        super(game);
        guiCam = new OrthographicCamera(480, 320);
        guiCam.position.set(480 / 2, 320 / 2, 0);

        image = new Texture(Gdx.files.internal("splash.png"));
        batcher = new SpriteBatch();
    }

    @Override
    public void update(float deltaTime)
    {

    }

    @Override
    public void present(float deltaTime)
    {
        GLCommon gl = Gdx.gl;
        gl.glClearColor(1, 0, 0, 1);
        gl.glClear(GL10.GL_COLOR_BUFFER_BIT);
        guiCam.update();

        batcher.begin();
        batcher.draw(image, 100, 100);
        batcher.end();
    }

    @Override
    public void pause()
    {

    }

    @Override
    public void resume()
    {

    }

    @Override
    public void dispose()
    {

    }
}
